<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML>
<html>
	<head>
		<base href="<%=basePath%>">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="description" content="JOMOO维修师傅专用系统" />
		<title>JOMOO维修登记平台</title>
		<link type="text/css" rel="stylesheet" href="include/css/css.css" />
		<link type="text/css" rel="stylesheet" href="include/css/bootstrap.min.css" />
		<link type="text/css" rel="stylesheet" href="include/iconFont/1.0.8/iconfont.css"/ >
		<link type="text/css" rel="stylesheet" href="include/css/welcome.css" />
		</head>
		<style>
			body .yourclass{border-radius:10px;}
			body .layui-layer-lan .layui-layer-title{border-radius:5px 5px 0 0;}
		</style>
		<script type="text/javascript">
			function showCenters()
		    {
		    	layer.open({
				    type: 2,
				    skin: 'layui-layer-lan', 
				    title: "向导流程",
				    shadeClose: false,
				    shade: 0.4,
				    closeBtn: 2,
				    anim:5,
				    area: ['720px', '55%'],
				    offset:['90px','170px'],
				    fadeIn : [600 , true],
				    loading : {type : 1},
				    content: 'view/sheet/FlowSheet.jsp?sheet=0'
				}); 
		    }
			
			function showAccountOrNote(){
				var index = layer.open({  
                    type: 2,
                    closeBtn:1,
                    content: 'view/account/anyWhereView.jsp',  
                    area: ['820px', '500px'], 
                   	offset:['60px','150px'],
                    title: '<font style="color:gray;">当前位置：随心记</font>',  
                    maxmin: false 
                });
				layer.full(index);
			}
			
			function showJisuan()
		    {
		    	layer.open({
				    type: 2,
				    skin: 'layui-layer-lan', 
				    title: '<i class="Hui-iconfont" style="font-size:20px;">&#xe6b5;</i> 师傅计算器',
				    shadeClose: false,
				    shade: [0],
				    closeBtn: 1,
				    anim:5,
				    area: ['459px', '72.3%'],
				    offset:['40px','260px'],
				    fadeIn : [600 , true],
				    loading : {type : 1},
				    content: 'view/sys/jisuanTool.jsp'
				}); 
		    }
			
			function showAccountView()
		    {
		    	layer.open({
				    type: 2,
				    skin: 'layui-layer-lan', 
				    title: '<i class="Hui-iconfont" style="font-size:20px;">&#xe61e;</i> 本月产品安装明细图',
				    shadeClose: false,
				    shade: [0],
				    closeBtn: 2,
				    anim:5,
				    area: ['851px', '450px'],
				    offset:['65px','120px'],
				    fadeIn : [600 , true],
				    loading : {type : 1},
				    content: 'view/account/accountShowView.jsp'
				}); 
		    }
			
			function showtip(num)
			{
				if(1 == num)
				{
					  layer.tips('哪里不会点这里', '#tip1', {tips: [3, '#ff4a43'],guide:1,time:5000});
				}
				if(2 == num)
				{
					  layer.tips('随时记笔记，绿色环保', '#tip2', {tips: [3, '#22beef'],guide:1,time:5000});
				}
				if(3 == num)
				{
					  layer.tips('最近你赚了吗？', '#tip3', {tips: [3, '#a2d200'],guide:1,time:5000});
				}
				if(4 == num)
				{
					  layer.tips('便捷方便的小工具~', '#tip4', {tips: [3, '#8e44ad'],guide:1,time:5000});
				}
			}
			
			function closetip(num)
			{
				if(1 == num)
				{
					  layer.tips('','#tip1', {tips: [3, '#ff4a43'],guide:1,time:100});
				}
				if(2 == num)
				{
					  layer.tips('','#tip2', {tips: [3, '#22beef'],guide:1,time:100});
				}
				if(3 == num)
				{
					  layer.tips('','#tip3', {tips: [3, '#a2d200'],guide:1,time:100});
				}
				if(4 == num)
				{
					  layer.tips('','#tip4', {tips: [3, '#8e44ad'],guide:1,time:100});
				}
			}
			
			function changeTimeType()
			{
				
				var d = new Date();
				var hour = d.getHours(); 
				
				if (hour >= 6 && hour < 8) {
					$("#timefont").css('color', '#CCCCFF');
					$("#timefont").html('早上好');
				} else if (hour >= 8 && hour < 11) {
					$("#timefont").css('color', '#99CCFF');
					$("#timefont").html('上午好');
				} else if (hour >= 11 && hour < 13) {
					$("#timefont").css('color', '#FF0033');
					$("#timefont").html('中午好');
				} else if (hour >= 13 && hour < 18) {
					$("#timefont").css('color', '#FF9900');
					$("#timefont").html('下午好');
				} else {
					$("#timefont").css('color', '#663399');
					$("#timefont").html('晚上好');
				}
				
				$.ajax({
					type: "POST",
					url: "JqueryAction/getCounts.action",
					dataType: "json",
					success: function(res)
					{
						$("#waitC").html(res.waitCount);
						$("#fixC").html(res.fixCount);
						$("#execC").html(res.exceCount);
						$("#ycC").html(res.ycCount);
						
						$("#hwait").val(res.waitCount);
						$("#hfix").val(res.fixCount);
						$("#hexec").val(res.exceCount);
						$("#hyc").val(res.ycCount);
					}
				});
			}
			
			function sawCountView(flag)
			{
				if(1 == flag)
				{
					if(0 == $("#hwait").val())
					{
						return;
					}
					else
					{
						showCountView(flag);
					}
				}
				if(2 == flag)
				{
					if(0 == $("#hfix").val())
					{
						return;
					}
					else
					{
						showCountView(flag);
					}
				}
				if(3 == flag)
				{
					if(0 == $("#hexec").val())
					{
						return;
					}
					else
					{
						showCountView(flag);
					}
				}
				if(4 == flag)
				{
					if(0 == $("#hyc").val())
					{
						return;
					}
					else
					{
						showCountView(flag);
					}
				}
				if(5 == flag)
				{
					showCountView(flag);
				}
			}
			
			function showCountView(flags)
			{
				var msg = '';
				
			 	if(1 == flags)
			    {
			    	msg = '待安装卡单详情';
			    }
				if(2 == flags)
			    {
			    	msg = '待维修卡单详情';
			    }
				if(3 == flags)
			    {
			    	msg = '异常卡单详情';
			    }
				if(4 == flags)
			    {
			    	msg = '延迟安装卡单详情';
			    }
				if(5 == flags)
			    {
			    	msg = '卡单废纸篓';
			    }
				layer.open({
				    type: 2,
				    skin: 'layui-layer-lan', 
				    title: msg,
				    shadeClose: false,
				    shade: [0],
				    closeBtn: 1,
				    anim:5,
				    area: ['900px', '52.5%'],
				    offset:['130px', '100px'],
				    fadeIn : [600 , true],
				    loading : {type : 1},
				    content: 'view/sys/IndexMsgShowTable.jsp?flag='+flags
				}); 
			}
		</script>
	<body onload="changeTimeType();">
		<div class="mainbody" style="margin-top: -10px">
			<div class="currmenu">
				<ul class="rig_nav">
					<li>
						&nbsp;&nbsp;<font style="color: gray;">当前位置：欢迎主页</font>
					</li>
				</ul>
			</div>
			<div class="adtip">
				<div class="tip">
					<p class="goom">
						<font id="timefont" style="font-weight: bold;font-size: 26px;font-family:楷体"></font><span>&nbsp;&nbsp;郝师傅</span>
					</p>
					<p>
						您今日有
						<span><a href="javascript:void(0);" id="waitC" onclick="sawCountView(1)"></a></span>条待安装，
						<span><a href="javascript:void(0);" id="fixC" onclick="sawCountView(2)"></a></span>条待维修，
						<span><a href="javascript:void(0);" id="execC" onclick="sawCountView(3)"></a></span>条安装异常，
						<span><a href="javascript:void(0);" id="ycC" onclick="sawCountView(4)"></a></span>条延迟安装通知！
						<span>
								<button style="margin-left:900px;height: 70px;margin-top: -100px;font-size: 18px;font-weight:bold;" class="btn btn-success" type="button" onclick="sawCountView(5)">
								<i class="Hui-iconfont" style="font-size: 45px;">&#xe609;</i>卡单废纸篓</button>
						</span>
						<input type="hidden" id="hwait" value=""/>
						<input type="hidden" id="hfix" value=""/>
						<input type="hidden" id="hexec" value=""/>
						<input type="hidden" id="hyc" value=""/>
					</p>
				</div>
			</div>
			<div class="rig_link">
			<div class="four-grids">
					<a href="javascript:void(0);" style="text-decoration:none;" onclick="showCenters();" >
						<div class="col-md-3 four-grid" id="tip1" onmouseover="showtip(1);" onmouseout="closetip(1);">
							<div class="four-agileits a1" style="height: 300px;width:230px;float: left;margin-left: 15px;">
								<div class="four-text">
									<h3 style="font-weight: bolder;">登记流程</h3>
										<h4> <i class="Hui-iconfont" style="font-size: 150px;">&#xe6aa;</i></h4>
								</div>
							</div>
						</div>
					</a>
					<div class="col-md-3 four-grid" id="tip2" onmouseover="showtip(2);" onmouseout="closetip(2);">
						<a href="javascript:void(0);" style="text-decoration:none;" onclick="showAccountOrNote();">
							<div class="four-agileinfo a2" style="height: 300px;width:240px;float: left;margin-left: 5px;" >
								<div class="four-text" >
									<h3 style="font-weight: bolder;">随心记</h3>
									<h4><i class="Hui-iconfont" style="font-size: 150px;">&#xe60c;</i></h4>
								</div>
							</div>
						</a>
					</div>
					<div class="col-md-3 four-grid" id="tip3" onmouseover="showtip(3);" onmouseout="closetip(3);">
						<a href="javascript:void(0);" style="text-decoration:none;" onclick="showAccountView();">
							<div class="four-w3ls a3" style="height: 300px;width:240px;float: left;margin-left: 5px;">
								<div class="four-text">
									<h3 style="font-weight: bolder;">近期走势</h3>
									<h4><i class="Hui-iconfont" style="font-size: 150px;">&#xe61a;</i></h4>
								</div>
							</div>
						</a>
					</div>
					<div class="col-md-3 four-grid" id="tip4" onmouseover="showtip(4);" onmouseout="closetip(4);">
						<a href="javascript:void(0);" style="text-decoration:none;" onclick="showJisuan();">
						<div class="four-wthree a4" style="height: 300px;width:240px;float: left;margin-left: 0px;">
							<div class="four-text">
								<h3 style="font-weight: bolder;">计算器</h3>
								<h4><i class="Hui-iconfont" style="font-size: 150px;">&#xe62e;</i></h4>
							</div>
						</div>
						</a>
					</div>
					<div class="clearfix"></div>
				</div>
			</div>
		</div>
		<div class="adtip" style="margin-top: 230px">
			<div class="tip">
				<p class="goom">
					<font  style="font-weight: bold;font-size: 26px;font-family:楷体"></font><span>&nbsp;&nbsp;</span>
				</p>
				<p >
				<font style="font-size: 12px;padding-left:135px;">2017 © 聪明智系列-易录 EIAP V1.0 Write by Haosc. 版权所有. 前端鸣谢 | <a href="http://layer.layui.com/" target="_blank">
						LAYER</a> | <a href="http://layer.layui.com/" target="_blank">LAYUI</a> | <a href="http://www.trirand.com/blog/" target="_blank">JQGRID</a> 
							| <a href="http://jqueryui.com/" target="_blank">JQUERY-UI</a> | <a href="http://getbootstrap.com/" target="_blank">BOOTSTRAP</a> | 
								<a href="http://echarts.baidu.com/" target="_blank">ECHART</a> | <a href="http://www.h-ui.net/" target="_blank">HUI</a> | </font>
					<br/>
					<br/>
					<br/>
					<br/>
					<br/>
					<br/>
					<br/>
				</p>
			</div>
		</div>
		<script type="text/javascript" src="include/js/jquery-1.7.min.js"></script>
		<script type="text/javascript" src="include/layer/layer.js"></script>
		<script type="text/javascript" src="include/js/bootstrap.min.js"></script>
		<script type="text/javascript" src="include/js/H-ui.js"></script>
		<script type="text/javascript" src="include/js/H-ui.admin.js"></script>
	</body>